#include <vector>
#include <fstream>
#include <iostream>

using namespace std;

int bucketList() {
  vector<int> events(1000, 0);

  ifstream ifs("BucketList.in");
  ofstream ofs("BucketList.out");

  int cows = 0;
  ifs >> cows;

  for (int i = 0; i < cows; ++i) {
    int start = 0, stop = 0, buckets = 0;
    ifs >> start >> stop >> buckets;

    events[start] += buckets;
    events[stop] -= buckets;
  }

  int maxBuckets = 0, currBuckets = 0;

  for (int event : events) {
    currBuckets += event;
    maxBuckets = max(maxBuckets, currBuckets);
  }

  ofs << maxBuckets;
  return maxBuckets;
}

int main(int argc, char const *argv[])
{
  /* code */
  return 0;
}
